package unboundWildcards;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: gia
 * Date: 30.08.2012
 * Time: 00:59
 *
 */
public class UnboundedWildcards {

    public static void main(String[] args) {

        Iterable<Integer> integers = Arrays.asList(1,2,3);

        System.out.println(getStringsFromInstances(integers));
    }

    public static Set<String> getStringsFromInstances(Iterable<?> instances){
        Set<String> classes = new HashSet<String>();

        for(Object o:instances){
           classes.add(o.toString());
        }

        return classes;
    }
}
